/***************************************************************************
 创建者：华磊
 开始时间：         : 2017.02.13
 copyright            : (C) 深圳市华友高科有限公司
 修改说明：（每次有修改就添加一条，带有 修改人，修改时间，修改描述）

 ***************************************************************************
 *   码垛指令视窗
*                                                                         *
 ***************************************************************************/
#ifndef PALLETPARAMETERSETTINGVIEW_H
#define PALLETPARAMETERSETTINGVIEW_H

#include <QDialog>
#include "../CommunicateDelegate/communicatenormaldelegate.h"
#include <QStandardItemModel>
class GlobalData;
namespace Ui {
class PalletParameterSettingView;
}
class MoveOperation;

class PalletParameterSettingView : public QDialog
{
    Q_OBJECT

public:
    explicit PalletParameterSettingView(int styleId,GlobalData *globalDataIn,MoveOperation *moveOperationIn,
                                        CommunicateNormalDelegate *communicateNormalIn
                                        ,QWidget *parent = 0);
    ~PalletParameterSettingView();

public slots:
    void showView_slot();
private:

    void updateConditionSHow(int index);
    void updateUiShow(StackInfo info);

    void updateView();
    void getInput();
    void changeLanguage();
    void initialDisplayStyle(int styleId);

    void showPointInfo(QString comment, PointPro showPointPro);
    void setTableText();

signals:
    void approachCountChanged(int newApproachCount);
    void fleeCountChanged(int newFleeCount);

private slots:
    void on_rowIntervalEnable_Btn_clicked();
    void on_columnIntervalEnable_Btn_clicked();
    void on_layerIntervalEnable_Btn_clicked();
    void on_auxiliary_checkBox_clicked();
    void on_comboBox_index_currentIndexChanged(int index);
    void fleetPointViewPage_slot(int isNext);
    void stackPointViewPage_slot(int isNext);
    void approchPointViewPage_slot(int isNext);
    void stackStylePointPage_slot(int isNext);
    //
    void on_pushButton_return_clicked();
    void on_pushButton_changeConfig_clicked();
    void on_recordPoint_Btn_Approach_clicked();
    void on_showPoint_Btn_approach_clicked();
    void on_recordPoint_Btn_flee_clicked();

    void on_moveToPoint_Btn_approach_pressed();

    void on_moveToPoint_Btn_approach_released();

    void on_moveToPoint_Btn_flee_pressed();

    void on_moveToPoint_Btn_flee_released();

    void on_showPoint_Btn_flee_clicked();

    void on_recordPoint_Btn_btm_clicked();

    void on_moveToPoint_Btn_btm_pressed();

    void on_moveToPoint_Btn_btm_released();

    void on_showPoint_Btn_btm_clicked();

    void on_recordPoint_Btn_start_clicked();

    void on_recordPoint_Btn_row_clicked();

    void on_recordPoint_Btn_column_clicked();

    void on_recordPoint_Btn_layer_clicked();

    void on_recordPoint_Btn_aux_clicked();

    void on_showPoint_Btn_start_clicked();

    void on_showPoint_Btn_row_clicked();

    void on_showPoint_Btn_column_clicked();

    void on_showPoint_Btn_layer_clicked();

    void on_showPoint_Btn_aux_clicked();

    void on_moveToPoint_Btn_start_pressed();

    void on_moveToPoint_Btn_start_released();

    void on_moveToPoint_Btn_row_pressed();

    void on_moveToPoint_Btn_row_released();

    void on_moveToPoint_Btn_column_pressed();

    void on_moveToPoint_Btn_column_released();

    void on_moveToPoint_Btn_layer_pressed();

    void on_moveToPoint_Btn_layer_released();

    void on_moveToPoint_Btn_aux_pressed();

    void on_moveToPoint_Btn_aux_released();

    void on_recordPoint_Btn_Fstyle_clicked();

    void on_showPoint_Btn_Fstyle_clicked();

    void on_comboBox_styleType_activated(int index);

    void on_moveToPoint_Btn_Fstyle_pressed();

    void on_moveToPoint_Btn_Fstyle_released();

    void on_recordPoint_Btn_FstyleTopLayer_clicked();

    void on_moveToPoint_Btn_FstyleTopLayer_pressed();

    void on_moveToPoint_Btn_FstyleTopLayer_released();

    void on_showPoint_Btn_layer_FstyleTopLayer_clicked();

    void on_button_setPointPathIndex_clicked();

    void on_comboBox_FstyleRow_activated(int index);

public slots:

    void moveToPointSlot(PointPro target );
    void moveToPointFinishSlot();

private:
    Ui::PalletParameterSettingView *ui;
    CommunicateNormalDelegate *communicateNormal;
    GlobalData *globalData;
    MoveOperation *moveOperation;
    struct PalletMiddleInfo palletMiddleInfo;

    QString intervalOnPicture;
    QString intervalOffPicture;

    QStandardItemModel *model;
    QVector <QString > sixAxisName;

//    StackStylePointInfoView *stackStylePointInfoView;
//    ApproachPointView *approachPointView;
//    FleePointView *fleePointView;
//    StackPointView *stackPointView;
//    ShowPointInfoView *showPointInfoView;

};



#endif // PALLETPARAMETERSETTINGVIEW_H
